package com.lst.mapper;

import com.lst.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface UserMapper {
    /**
     * 根据id获取User信息
     * @return
     */
    public User queryUserById(Long id);

    List<User> queryByPage(@Param("page") Integer page, @Param("pagesize") Integer pagesize);

    Long queryTotal();

    List<User> queryUserAll();

    /**
     * 新增用户
     * @param user
     * @return
     */
    public int addUser(User user) throws Exception;

    public void deleteUser(int id) throws  Exception;

    public void editUser(User user);
}
